]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar: Unbind settings when destroying
authorJonas Ådahl <jadahl@gmail.com>
Wed, 17 Aug 2022 13:53:45 +0000 (15:53 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 25 Nov 2022 21:09:37 +0000 (22:09 +0100)
Running dispose on the setting causes issues when we're being destroyed,
as the signal handler in the GSettings binding will be cleared by the
GObject itself before it has the chance, resulting in warnings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>

js/ui/calendar.js

index 84bdaeea88abc0f02e45419f2bf9013e8560456e..9851536638ff5b990c53d150cbc6fe6fe2adf003 100644 (file)
@@ -908,7 +908,7 @@ class DoNotDisturbSwitch extends PopupMenu.Switch {
             Gio.SettingsBindFlags.INVERT_BOOLEAN);
 
         this.connect('destroy', () => {
-            this._settings.run_dispose();
+            Gio.Settings.unbind(this, 'state');
             this._settings = null;
         });
     }